#ifndef _APPLICATION_H_
#define _APPLICATION_H_

#define APP (CApplication::GetApp())


class CApplication
{
private:
	static CApplication* _this;
	bool m_running;
public:
	static void SetApp(CApplication* app) {_this = app;}
	static CApplication* GetApp() {return _this;}


	CApplication();
	virtual ~CApplication();

	virtual bool Init() = 0;
	virtual void MainLoop() = 0;
	virtual void Destroy() = 0;

	bool IsRunning() {return m_running;}
	void Terminate() {m_running = false;}
};

#endif //_APPLICATION_H_